A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent disclosure, as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all copyright rights whatsoever.
The present invention generally relates to an object-oriented method and system for modeling and in particular it relates to a method for associating objects in the same model or completely different models.
The storage and manipulation of data records or objects within a database application is well known in the prior art. A database allows one to store information in it; and it does not necessarily have any special meaning associated with the things that are stored in the database. A repository not only uses the database as a data store, but it is a layer above a database. A repository has information about the things stored in the database. Stated otherwise, a repository is like a card catalog that is found in the library, with the library being analogous to a database.
With the advent of repositories, accessibility of data within databases has improved. However, as these repositories become larger and more complex an improved method is required to support not only extensive object modeling in such a repository, but also associating classes between models.
In the prior art, associations between objects were defined by using linked lists. Linked lists have the disadvantage of requiring additional processing and memory resources. Creation of a linked list to associate objects in a repository is therefore a disadvantage.
Another disadvantage of the prior art is that any bi-directional association between objects in two different models requires changing those models and objects for constructing the association. This may not be desirable for reasons of loss of information contained in the model.
An object of this invention is to connect two objects in different models without modifying either object or model.
Another object of this invention is to provide a method for associating objects using a namespace, where the namespace is a service available for assigning unique names to objects in a repository.
Yet another object of this invention is to provide a method for associating an object to another object by storing the object identifier of the associated object in the namespace.
Another object of this invention is to increase the efficiency of processor and memory usage by defining and using namespaces for creating associations between objects stored in a repository.
A feature of this invention is that the association using a namespace allows bi-directional access of the objects associated using that namespace.
Another feature of this invention is that associations created between different objects can be constructed or deleted using the method of this invention.
An advantage of this invention is that since names in a namespace are indexed, faster look up of names is possible from the namespace thus enabling faster retrieval of associated objects.
These and other objects, which will become apparent as the invention is described in detail below, are provided by a method in a computer system executing a repository program for dynamically linking two objects in two different models within the repository. The method includes the steps of receiving object identifiers of each of the two objects and an association name from a computer program using the method. The association name is then used to extract a namespace object from the repository program, wherein the namespace object is a part of the repository program for containing association names. Next, a determination is made as to whether or not an association already exists between either one of the two objects and the namespace object. If it is determined that no association exists, then the association name of a first of the two objects and the namespace are changed to an object identifier of a second of the two objects. Finally, the association name of the second of the two objects and the namespace are changed to an object identifier of the first of the two objects.
Still other objects, features and advantages of the present invention will become readily apparent to those skilled in the art from the following detailed description, wherein is shown and described only the preferred embodiment of the invention, simply by way of illustration of the best mode contemplated of carrying out the invention. As will be realized, the invention is capable of other and different embodiments, and its several details are capable of modifications in various obvious respects, all without departing from the invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive, and what is intended to be protected by Letters Patent is set forth in the appended claims. The present invention will become apparent when taken in conjunction with the following description and attached drawings, wherein like characters indicate like parts, and which drawings form a part of this application.